<extend name="Public/base"/>

<block name="body">
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>分类管理</h2>
	</div>
	<div class="tools auth-botton">
        <a class="btn" href="{:U('createType')}">新 增</a>
        <button class="btn ajax-post" url="{:U('changeStatus?method=resumetype')}" target-form="ids">启 用</button>
        <button class="btn ajax-post" url="{:U('changeStatus?method=forbidtype')}" target-form="ids">禁 用</button>
        <!-- <button class="btn ajax-post confirm" url="{:U('changeStatus?method=deletetype')}" target-form="ids">删 除</button> -->
	</div>
	<!-- 数据列表 -->
    <div class="data-table table-striped">
	    <table class="">
	    	<thead>
	    		<tr>
	    			<!-- <th class="row_selected row-selected"><input type="checkbox" class="check-all"></th> -->
	    			<th class="">ID</th>
	    			<th class="">分类名称</th>
	    			<th class="">备注</th>
	    			<th class="">状态</th>
	    			<th class="">操作</th>
	    		</tr>
	    	</thead>
	    	<tbody>
	    		<notempty name="_list">
	    		<volist name="_list" id="vo">
	    		<tr>
	    			<!-- <td><input type="checkbox" class="ids" name="id[]" value="{$vo.id}"></td> -->
	    			<td>{$vo.id}</td>
	    			<td>{$vo.name}</td>
	    			<td>{$vo.remark}</td>
	    			<td>{$vo.status_text}</td>
	    			<td>
	    			<eq name="vo.status" value="1">
					<a href="{:U('GoodsType/changeStatus?method=forbidtype&id='.$vo['id'])}" class="ajax-get">禁用</a>
					<else/>
					<a href="{:U('GoodsType/changeStatus?method=resumetype&id='.$vo['id'])}" class="ajax-get">启用</a>
					</eq>
					<a href="{:U('GoodsType/edit?id='.$vo['id'])}">编辑</a>
	    			<a href="{:U('GoodsType/changeStatus?method=deletetype&id='.$vo['id'])}" class="confirm ajax-get">删除</a></td>
	    		</tr>
	    		</volist>
	    		<else/>
	    		<td colspan="5" class="text-center">暂时还没有数据！</td>
	    		</notempty>
	    	</tbody>
	    </table>
	    <div class="page">
	    	{$_page}
	    </div>
    </div>
</block>

<block name="script">
	<script type="text/javascript">
    //导航高亮
    highlight_subnav('{:U('GoodsType/index')}');
	</script>
</block>